package cn.wolfcode.shop.cloud.redis;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class MemberKeyPrefix implements KeyPrefix {
    private int expireTime;
    private String keyPrefix;

    public MemberKeyPrefix() {
    }

    public MemberKeyPrefix(int expireTime, String keyPrefix) {
        this.expireTime = expireTime;
        this.keyPrefix = keyPrefix;
    }

    @Override
    public String getPreix() {
        return this.keyPrefix;
    }

    @Override
    public int getExpireTime() {
        return this.expireTime;
    }
//this就是下面这个常量
public static final MemberKeyPrefix USER_TOKEN =new  MemberKeyPrefix(1800,"userToken");


}
